class_name PlayerSystem
extends BaseSystem

@export var player_scene:PackedScene
var cur_player:PlayerEntity = null

func init_player():
	if not cur_player:
		cur_player = player_scene.instantiate()
		add_child(cur_player)
	var pos = GameMapSystem.cur_room.get_birth_pos()
	translate_player_pos(pos)
	cur_player.init()
func translate_player_pos(pos:Vector2):
	if not cur_player:
		return
	cur_player.global_position = pos
func get_player() -> PlayerEntity:
	return cur_player

func init_system():
	pass
